package com.todod.base.module.base.api;

import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RestController;

@RestController // 提供 RESTful API 接口，给 Feign 调用
@Validated
@Slf4j
public class DevcieApiImpl implements DevcieApi{
    final String baseUri = "127.0.0.1"+"/";

    @Override
    public void startDevice(String port) {
        log.info(baseUri + "start" +"/" +port);
    }

    @Override
    public void stopDevice(String port) {
        log.info(baseUri + "stop" +"/" +port);
    }

    @Override
    public void startLWD(String port) {
        log.info(baseUri + "tcpStart" +"/" +port);
    }

    @Override
    public void stopLWD(String port) {
        log.info(baseUri + "tcpStop" +"/" +port);
    }
}
